package com.lp.biz.business.controller;

import com.lp.biz.business.service.BusinessService;
import com.lp.common.annotation.PermissionAnnotation;
import com.lp.common.entity.PageParams;
import com.lp.common.utils.CommonResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import static com.lp.common.constant.MenuConstant.*;

/**
 * BusinessController
 * @program: backend
 * @author Ke.Song
 * @since 2024-09-23 20:56:30
 */
@RestController
@RequestMapping("/business")
public class BusinessController {

    @Autowired
    private BusinessService businessService;

    /**
     * 获取商务合作列表
     * @param query 查询参数
     * @return 查询结果
     */
    @GetMapping()
    @PermissionAnnotation(menus = {BUSINESS})
    public CommonResult getBusiness(PageParams query) {
        return businessService.getBusiness(query);
    }

}
